/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package manager;

import java.util.List;
import javax.ejb.Remote;
import remoteEntity.User;

/**
 *
 * @author viktor
 */
@Remote
public interface UserManagerRemote {
    
    void demote(int id);
    
    User getGuestUser();

    boolean getIsAdmin();

    boolean getIsAdmin(int id);

    boolean getLoggedIn();

    /**
     * User must be manually set first! Can not be used to get the current user
     * @return
     */
    
    User getUser();

    User getUserById(int id);

    User login() throws Exception;

    void promote(int id);

    void register() throws Exception;

    public void setFields(String username, String password, String email, String firstname, String lastname);    
}
